<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="content-type" content="text/html;charset=utf-8">
		<script src='js/jquery.js'></script>
	</head>
	<body>
		<h1>pascal程序在线评测系统</h1>
		<div>
		<table border="1">
			<tr>
				<th>题号</th>
				<th>题目</th>
			</tr>
			<?php
				$problemlist = "./problems/problemlist";
				$handle = fopen($problemlist, "r");
				while ($problemInfo = fscanf($handle, "%s %d\n")){
					list($problemName, $pnum) = $problemInfo;
					echo "<tr><td>$pnum</td>";
					echo "<td><a href='problem.php?pnum=$pnum'>$problemName</a></td>";
				}
				fclose($handle);
			?>
		</table>
		</div>
		<a href='mailto:LiWang112358@gmail.com'>Mail : LiWang112358@gmail.com</a>
		<a href='chat.html'>chat online</a>
	</body>
</html>
